package TDALista;

public class DNode <E> implements Position <E> {
	
	protected E element;
	protected DNode <E> next, prev;
	
	public DNode (){
		element = null;
		next = prev = null;
	}
	
	public DNode (E elem){
		element = elem;
		next = prev = null;
	}
	
	public void setNext (DNode <E> newNext){
		next = newNext;
	}
	
	public void setPrev (DNode <E> newPrev){
		prev = newPrev;
	}
	
	public void setElement (E newElement){
		element = newElement;
	}
	
	public DNode<E> getNext (){
		return next;
	}
	
	public DNode<E> getPrev (){
		return prev;
	}

	public E element() {
		
		return element;
	}

}
